<?php
  $fp = fopen("amit.doc", 'w+');
  $str = "<B>This is the text for the word file created through php programming</B>";
  fwrite($fp, $str);
  fclose($fp);
?>